/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package puzzleevolution;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

/**
 *
 * @author vorispe1
 */
public class Picture {
    private String name;
    private int height;
    private int width;

    private BufferedImage img;



    public Picture(){}

    public Picture(String name, int height, int width){
        this.name = name;
        this.height = height;
        this.width = width;
    }

    public void Init() throws IOException{
        img = ImageIO.read(new File(this.getName()));
        this.setHeight(img.getHeight());
        this.setWidth(img.getWidth());
        Config.rozmeryObrazkuX = img.getWidth();
        Config.rozmeryObrazkuY = img.getHeight();
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the height
     */
    public int getHeight() {
        return height;
    }

    /**
     * @param height the height to set
     */
    public void setHeight(int height) {
        this.height = height;
    }

    /**
     * @return the width
     */
    public int getWidth() {
        return width;
    }

    /**
     * @param width the width to set
     */
    public void setWidth(int width) {
        this.width = width;
    }

}
